
CXXFLAGS =-fPIC	-O2 -g -Wall -fmessage-length=0 $(INCLUDES)
LDFLAGS      = -shared

COMN_DIR=../comn
THIRD_PARTY = ../third_party
LIVE_DIR=$(THIRD_PARTY)/live


SOURCE = $(wildcard *.cpp)
OBJS =	$(SOURCE:.cpp=.o)

INCLUDES = -I. \
	-I./include -I./src \
	-I$(COMN_DIR)/include \
	-I$(LIVE_DIR)/BasicUsageEnvironment/include \
	-I$(LIVE_DIR)/UsageEnvironment/include \
	-I$(LIVE_DIR)/groupsock/include \
	-I$(LIVE_DIR)/liveMedia/include \

	
LIBS = -lpthread \
	-L$(COMN_DIR)/lib -lcomn \
	-L$(LIVE_DIR)/groupsock -L$(LIVE_DIR)/liveMedia \
	-L$(LIVE_DIR)/UsageEnvironment -L$(LIVE_DIR)/BasicUsageEnvironment \
	-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment \
	

TARGET = ../bin/libRtspCaster.so

$(TARGET):	$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LDFLAGS)

all:	$(TARGET)

clean:
	rm -f $(OBJS) $(TARGET)
